import { CustomDate } from "../../components/custom_views/custom_date"

// 格式化日期为“2022年5月7日”形式
function getMemberExpireTime(successTimeStr, addMonths = 3) {
	const deadDate = CustomDate.addMonths(new Date(successTimeStr), addMonths)
	return CustomDate.formatSomeDate(deadDate, 'yyyy-MM-dd HH:mm:ss')
}

// 举例一个特定日期
// const inputDate = '2022-01-27T12:34:56Z'; // 替换成你的特定日期
// const formattedDate = formatRelativeDate(inputDate);
// console.log(formattedDate);


export const MemberUtils = {
	getMemberExpireTime
}